package com.mac.hosp_pre.admin;


import com.mac.hosp_pre.sys.config.SecurityAutoConfig;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.core.env.ConfigurableEnvironment;

@Slf4j
@MapperScan({"com.mac.hosp_pre.admin.mapper","com.mac.hosp_pre.sys.mapper"})
@SpringBootApplication(scanBasePackages = "com.mac.hosp_pre")
@EnableDiscoveryClient
@ImportAutoConfiguration({SecurityAutoConfig.class})
public class HospAdminApp {
    public static void main(String[] args) {
        ConfigurableEnvironment env = SpringApplication.run(HospAdminApp.class, args).getEnvironment();
        log.info("\n----------------------------------------------------------\n\t" +
                        "Application: '{}' is running Success! \n\t" +
                        "Local URL: \thttp://localhost:{}\n\t" +
                        "Document:\thttp://localhost:{}/doc.html\n" +
                        "----------------------------------------------------------",
                env.getProperty("spring.application.name"),
                env.getProperty("server.port"),
                env.getProperty("server.port"));
    }
}